public class Text2 {
    public static void main(String[] args) {
        int [] arr = {1,5,7,9};
        int ret = maxArr(arr);
        System.out.println(ret);
    }
    public static int maxArr(int [] arr){
        int max = arr[0];
        for (int i = 1; i < arr.length; i++) {
            if(arr[i] > max){
                max = arr[i];
            }
        }
        return max;
    }
}
